from typing import Annotated
from fastapi import FastAPI, Path, Query

app = FastAPI()

@app.get('/items/{name}')
async def read_user_item(
    name: Annotated[str, Path(title='姓名')],
    age: Annotated[int, Query(default=..., title='年龄')],
    grade: Annotated[str, Query(title='年级', alias='grade_')],
    sex: str = Query(default='男', title='性别')
):
    return '查询参数'